<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<script type="text/javascript" src='vue.js'></script>
</head>
<body>

	<div id=root>
		<input type="button" value="btn1" @click=myclick >
	<h3 v-if='flag'>这个v-if</h3>
	<h3 v-show='flag'>这个v-show</h3>

	</div>
<!-- 	<div id=root v-html="msg"></div> -->
	<script type="text/javascript">
	new Vue({
		el:"#root"
// 		,template:'<h1>hh {{msg}}</h1>'
		,data:{
			flag:true
		}
		,methods:{
			myclick:function(){
				
					this.flag=!this.flag;
				
			}
		}
	
	})
	</script>
</body>
</html>